package com.javaclimb.music.service.impl;

import com.javaclimb.music.dao.SingerMapper;
import com.javaclimb.music.domain.Singer;
import com.javaclimb.music.service.SingerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SingerServiceImpl implements SingerService {
    @Autowired
    private SingerMapper singerMapper;

    public List<Singer> selectSinger() {
        return singerMapper.selectSinger();
    }

    @Override
    public int insertSinger(Singer singer) {

        return singerMapper.insertSinger(singer);//singer.getId(),singer.getName(),singer.getSex(),singer.getPic(),singer.getBirth(),singer.getLocation(),singer.setIntroduction
    }

    @Override
    public int updateSinger(Singer singer) {
        return singerMapper.updateSinger(singer);
    }

    @Override
    public int deleteSinger(Integer id) {
        return singerMapper.deleteSinger(id);
    }

    @Override
    public int likeSinger(String name) {
        return singerMapper.likeSinger(name);
    }
}
